package cn.zlj.nmcc.domain;

import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.math.BigDecimal;
import java.util.Date;


@Data
@Document(indexName = "course", type = "_doc")
public class CourseDoc {
    @Id
    private Long id;
    @Field(type = FieldType.Text, analyzer = "ik_max_word", searchAnalyzer = "ik_max_word")
    private String name;
    @Field(type = FieldType.Keyword) // 指定映射类型不分词
    private String pic;

    @Field(type = FieldType.Keyword)
    private String gradeName;

    @Field(type = FieldType.Long)
    private Long gradeId;

    @Field(type = FieldType.Keyword)
    private String forUser;

    @Field(type = FieldType.Keyword)
    private String courseTypeName;

    @Field(type = FieldType.Keyword)
    private String courseTypeId;

    @Field(type = FieldType.Date)
    private Date startTime;

    @Field(type = FieldType.Date)
    private Date endTime;

    @Field(type = FieldType.Integer)
    private Integer totalMinute;

    @Field(type = FieldType.Date)
    private Date onlineTime;

    @Field(type = FieldType.Text, analyzer = "ik_max_word", searchAnalyzer = "ik_max_word")
    private String teacherNames;

    @Field(type = FieldType.Keyword)
    private String charge;

    @Field(type = FieldType.Keyword)
    private String qq;

    @Field(type = FieldType.Double)
    private BigDecimal price;

    @Field(type = FieldType.Double)
    private BigDecimal priceOld;

    @Field(type = FieldType.Integer)
    private Integer validDays;

    @Field(type = FieldType.Integer)
    private Integer saleCount;

    @Field(type = FieldType.Integer)
    private Integer viewCount;

    @Field(type = FieldType.Integer)
    private Integer commentCount;

}
